package org.blogwu.learn.designpattern.chapter17.v1;

public abstract class ACourse {

    /**
     * final  是希望子类不修改这个方法
     */
    protected final void makeCourse() {
        makePPT();
        makeVideo();
        if (needWriteArticle()) {
            writeArticle();
        }
        packageCourse();
    }

    final void makePPT() {
        System.out.println(" 制作PPT");
    }

    final void makeVideo() {
        System.out.println("制作视频");
    }

    final void writeArticle() {
        System.out.println("编写📱");
    }

    protected boolean needWriteArticle() {
        return false;
    }

    abstract void packageCourse();

}
